<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<script>
    function $(id){
        return  document.getElementById(id)
    }

    function changeCode(){
       $("imgCode").src="/checkCode?"+Math.random();
    }
</script>
<body>

<span style="color: red" th:text="${info}"></span>
<form action="/user/login">
    用户名：<input type="text" name="username"><br>
    密码：<input type="text" name="password"><br>
    <img src="/checkCode" id="imgCode"><a href="javascript:changeCode()">看不清，请重新输入</a><br>
    验证码：<input type="text" name="checkCode">
    <input type="submit" value="登陆">
</form>
</body>
</html>